package com.neusoft.mms.service;

import com.neusoft.mms.bean.UserVo;
import com.neusoft.mms.dao.UserDao;



public class UserServiceImpl implements UserService{
	private UserDao userDao;

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	public boolean login(String username, String password) {
		boolean isSuccess = false;
		//根据用户名查询用户是否存在
		UserVo user = userDao.getUserByName(username);
		if(user!=null){
			if(password.equals(user.getPassword())){
				isSuccess = true;
			}
		}

		return isSuccess;
	}

}
